###################################################################### Product:      KnowledgeEngine (Plone Edition)## File:         GroupProviderService.py## Copyright:    Copyright (c) 2004, Faulkner Technologies## Author:       Brian Oliver## Description:  Defines an abstract service that is used to provide#               the KnowledgeEngine internal security model with#               'Group' instances.##               This service provides a layer of protection over#               Group management.  For example, implementations of this#               service may include; Zope ACL User Folders, Plone#               User Folders, MySQL or LDAP implementations.## See Also:     Service, User, UserProviderService#####################################################################
####################################################################### KnowledgeEngine Library Importsfrom Products.KnowledgeEngine.Common import *from Products.KnowledgeEngine.Service import ServiceInfo, Service
####################################################################### Zope Library Imports# (none)
####################################################################### Zope Library Imports# (none) ####################################################################### Python Library Imports# (none)
####################################################################### GroupProviderService Class Definitionclass GroupProviderServiceInfo(ServiceInfo):    """        Defines the the group provider service meta-information    """        #---------------------------------------------------------------#        def getClassName(self):        """            Returns the name of the class for which             we are providing information.        """        return 'GroupProviderService'

    #---------------------------------------------------------------#
    def getDisplayName(self):        """            Return a friendly name for the class instances            (this is used for displaying in lists etc)        """            return "KnowledgeEngine: Group Provider Service"            #---------------------------------------------------------------#
    def getServiceName(self):        """            ABSTRACT: Return the lookup-identity.                        This method must be overriden to provide a unique service name            (this name is used to set the zope id of the service            when created)        """                return "knowledgeengine_groupproviderservice"
####################################################################### GroupProviderService Class Definitionclass GroupProviderService(Service):    """        Defines a tool that may be used to manage Knowledge Engine        groups    """
    #---------------------------------------------------------------#
    #ABSTRACT TRANSIENT: a ServiceInfo implementation instance to provide info about this service    _SERVICEINFO = GroupProviderServiceInfo()
    #---------------------------------------------------------------#
    def __init__(self):        """            Constructor for the object        """                #this is a stateless mix-in        pass            #---------------------------------------------------------------#
    def getGroup(self, groupIdentity):        """            Returns a Knowledge Engine Group instance for the             group with the provided identity.                        The groupIdentity is a unique string that identifies the group            with for the service implementation.  Typically this is            the group name (but is actually implementation dependant)                        Returns None if the group is unknown.                        RETURN TYPE: Group        """                return None
    #---------------------------------------------------------------#
    def getGroups(self):        """            Returns a list of groups that this service provides                        RETURN TYPE: [Group]        """                return []
    #---------------------------------------------------------------#
    def getParentGroupsForActor(self, actorIdentity):        """            Returns a list of the immediate groups to which the            specified actor belongs.                        RETURN TYPE: [Group]        """                return []
    #---------------------------------------------------------------#
    def getGroupsForActor(self, actorIdentity):        """            Returns a list of all of the groups to which the specified 
            actor either directly or indirectly belongs.
                        RETURN TYPE: [Group]        """                return []
    #---------------------------------------------------------------#
    def getGroupsManagedByActor(self, actorIdentity):        """            Returns a list of all of the groups that the            specified actor belongs manages.                        NOTE: This is different from the groups to which            an actor belongs.  This feature is only implemented            by GRUFAccessUserFolder.                        RETURN TYPE: [Group]        """                return []
    #---------------------------------------------------------------#
    def getUserIdentitiesInGroup(self, groupIdentity):        """            Return a list the identities of users that belong to             the specified group (does not include users in sub-groups)                        RETURNS: [String]        """                return []
    #---------------------------------------------------------------#
####################################################################### Class Initialisation# (none)
